#include<stdio.h>
#include<unistd.h>
#include<fcntl.h>

int main(int argc, char *argv[]){

    int fd=open("test2.txt",O_RDONLY|O_CREAT,0644);
    if (fd == -1)
    {
        printf("Error in opening file\n");
    }

    printf("File opened successfully\n");
    return 0;
}